use std::collections::HashSet;
impl Solution {
    pub fn distinct_averages(mut nums: Vec<i32>) -> i32 {
        nums.sort();
        let mut set=HashSet::new();
        let (mut l, mut r)=(0,nums.len()-1);
        while l<r {
            let avg=((nums[l]+nums[r]) as f64)/2f64;
            set.insert(avg.to_string());
            l+=1;
            r-=1;
        }
        return set.len() as i32;
    }
}